package Recursion;

/**
 * @author yyq
 * @create 2021-10-12 17:25
 */
public class Simple {
    public static void main(String[] args) {
        //test(4);
        System.out.println(jiecheng(4));
    }

    public static void test(int n){
        if(n>1){
            test(n-1);
        }
        System.out.println(n);
    }

    public static int jiecheng(int n){
        if(n>1){
           return n*jiecheng(n-1);
        }
        return 1;
    }
}
